//==================================================
// 作 者：曾浩
// 日 期：2012-03-15
// 描 述：介绍本文件所要完成的功能以及背景信息等等
//==================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoreFrame.Core.Orm;
using System.Data;
using System.Collections;

namespace MarchEstate.Manager.BusinesEntity
{
	[Serializable]
	[Table(TableName = "WY_ChargeMoney", EntityType = EntityType.Table, IsGB = false)]
	public abstract class AbstractChargeMoney : CoreFrame.Business.AbstractBusines
	{
		private string _chargeid;//
		/// <summary>
		/// 
		/// </summary>
        [Column(FieldName = "ChargeID", DataKey = true, IsSingleQuote = true, Match = "Custom:Guid", IsInsert = false)]
		public string ChargeID
		{
			get { return _chargeid; }
			set { _chargeid = value; }
		}
		
		private string _ownerid;//
		/// <summary>
		/// 
		/// </summary>
		[Column(FieldName = "OwnerId", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string OwnerId
		{
			get { return _ownerid; }
			set { _ownerid = value; }
		}
		private string _ownername;//
		/// <summary>
		/// 
		/// </summary>
		[Column(FieldName = "OwnerName", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string OwnerName
		{
			get { return _ownername; }
			set { _ownername = value; }
		}

        private string _srccId;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "SrccId", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string SrccId
        {
            get { return _srccId; }
            set { _srccId = value; }
        }

        private string _srccName;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "SrccName", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string SrccName
        {
            get { return _srccName; }
            set { _srccName = value; }
        }

        private DateTime _lastchargedate;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "LastChargeDate", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public DateTime LastChargeDate
        {
            get { return _lastchargedate; }
            set { _lastchargedate = value; }
        }

        private decimal _lastsurplus;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "Lastsurplus", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
        public decimal Lastsurplus
        {
            get { return _lastsurplus; }
            set { _lastsurplus = value; }
        }

		private decimal _receivablefee;//
		/// <summary>
		/// 
		/// </summary>
		[Column(FieldName = "ReceivableFee", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public decimal ReceivableFee
		{
			get { return _receivablefee; }
			set { _receivablefee = value; }
		}
        private decimal _favourfee;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "FavourFee", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
        public decimal FavourFee
        {
            get { return _favourfee; }
            set { _favourfee = value; }
        }

		private decimal _realityfee;//
		/// <summary>
		/// 
		/// </summary>
		[Column(FieldName = "RealityFee", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public decimal RealityFee
		{
			get { return _realityfee; }
			set { _realityfee = value; }
		}
		
        private decimal _thissurplus;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "Thissurplus", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
        public decimal Thissurplus
        {
            get { return _thissurplus; }
            set { _thissurplus = value; }
        }

        private int _paymentType;
        [Column(FieldName = "PaymentType", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
        public int PaymentType
        {
            get { return _paymentType; }
            set { _paymentType = value; }
        }

		private int _chargeflag;//收费标识 0 正常 1退费
		/// <summary>
		/// 收费标识 0 正常 1退费
		/// </summary>
		[Column(FieldName = "ChargeFlag", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public int ChargeFlag
		{
			get { return _chargeflag; }
			set { _chargeflag = value; }
		}
		private string _accountid;//交款ID
		/// <summary>
		/// 交款ID
		/// </summary>
		[Column(FieldName = "AccountID", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string AccountID
		{
			get { return _accountid; }
			set { _accountid = value; }
		}
		private DateTime _chargedate;//
		/// <summary>
		/// 
		/// </summary>
        [Column(FieldName = "ChargeDate", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public DateTime ChargeDate
		{
			get { return _chargedate; }
			set { _chargedate = value; }
		}

        


		private int _chargeempid;//
		/// <summary>
		/// 
		/// </summary>
		[Column(FieldName = "ChargeEmpID", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public int ChargeEmpID
		{
			get { return _chargeempid; }
			set { _chargeempid = value; }
		}
		private string _chargeempname;//
		/// <summary>
		/// 
		/// </summary>
		[Column(FieldName = "ChargeEmpName", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string ChargeEmpName
		{
			get { return _chargeempname; }
			set { _chargeempname = value; }
		}

        private string _oldChargeID;
        [Column(FieldName = "OldChargeID", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string OldChargeID
        {
            get { return _oldChargeID; }
            set { _oldChargeID = value; }
        }

        private List<AbstractChargeMoneyDetail> _chargeMoneyDetailList;
        public List<AbstractChargeMoneyDetail> ChargeMoneyDetailList
        {
            get { return _chargeMoneyDetailList; }
            set { _chargeMoneyDetailList = value; }
        }

       

        /// <summary>
        /// 正式结算
        /// </summary>
        /// <param name="charge">结算对象</param>
        /// <param name="orderIds">对应的费用id</param>
        /// <returns></returns>
        public abstract bool ProcessChargeMoney(AbstractChargeMoney charge,List<string> headIds);

        /// <summary>
        /// 取消结算
        /// </summary>
        /// <param name="_chargeId">结算id</param>
        /// <param name="_chargeEmpID">操作员id</param>
        /// <returns>返回业主最新的初始化数据</returns>
        public abstract bool CancelChargeMoney(string _chargeId,int _chargeEmpID);

        /// <summary>
        /// 更改交款id
        /// </summary>
        /// <param name="_chargeId"></param>
        /// <returns></returns>
        public abstract bool AlterAccountId(string accountId);

        public abstract bool AlterChargeFlag(string chargeId, int flag);

        /// <summary>
        /// 获取结算列表
        /// </summary>
        /// <param name="_chargeEmpId">操作员id</param>
        /// <param name="_chargeDate">结算时间</param>
        /// <returns></returns>
        public abstract List<AbstractChargeMoney> GetChargeMoneyList(int _chargeEmpId, DateTime _chargeDate);


        public abstract List<AbstractChargeMoney> GetChargeMoneyList(string _srccId,PageInfo page);
	}
}